define(function(require){
	var $ = require("jquery");
	var justep = require("$UI/system/lib/justep");
	var help = require("$UI/highde/modbusItems/lib/settingEditDialogHelp");
	
	var Model = function(){
		this.callParent();
	};

	Model.prototype.saveCommit = function(event){
		justep.Util.hint("保存数据成功！");
		this.close();
	};

	Model.prototype.windowReceiver1Receive = function(event){
		help.getData(this.comp("mainData"), event.data.id, event.data.operation);
		this.comp("mainData").setValue('fEquip', event.data.parentId);

	};

	Model.prototype.mainDataValueChanged = function(event){
	//debugger;
		if(event.col == "fPointType"){
			var row = this.comp("pointTypeData").find(["fType"], [event.row.val("fPointType")], true);
			if(row.length > 0){
				event.row.val("fUnit", row[0].val("fUnit"));
			}
		}

	};

	return Model;
});